home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-11-15 | 5.0 KB | 123 lines | [TEXT/MPS ] |
- #
- # makefile for "fontCompress.r", the example for InstaCompOne font compression
- #
- #
- # to build installer script :
- # 1) select "Build" from "Build" menu
- # 2) type script name "fontCompress" ( note: ".r" is omitted )
- #
- # to build debug version of installer script :
- # 1) select "Build" from "Build" menu
- # 2) type script name "fontCompress.debug" ( note: ".r" is omitted )
- #
- #
- # mark young - 08/17/94
- #
-
- # • script names
-
- # the installer script name
- scriptName = fontCompress
- # the debug version installer script name
- debugScriptName = "{scriptName}.debug"
- # filename for ScriptCheck extension that will run when ScriptCheck does
- localScriptCheckExtName = {scriptName}.scx
-
-
- # • support directory names
-
- # directory where ScriptCheck MPW tool can be found
- ScriptCheckDir = :::ScriptCheck 4.0.3:
- # directory where RIncludes can be found
- InstallerRIncDir = :::DeveloperInterfaces:RIncludes:
- # directory where the Installer Debugger can be found
- InstallerDebuggerDir = :::Installer Debugger 4.0:
- # directory where the InstaCompOne stuff can be found
- InstaCompOneDir = :::InstaCompOne 1.0:
-
- # • tool names
-
- # InstaCompOne compression tool
- compressTool = {InstaCompOneDir}InstaCompOneTool
-
- # Splitting tool
- splitTool = {InstaCompOneDir}FileAndRsrcSplitterTool
-
- # Original ScriptCheck Extension
- ScriptCheckExtension = {InstaCompOneDir}InstaCompOneSCExt.rsrc
-
- # Fond Encoder tool
- fondTool = {InstaCompOneDir}FondEncoderTool
-
-
-
- # • simple font compression
-
- # source file name
- CompressFontFileName = Chicago
- # archive resulting from compression of source file
- CompressFontArchiveName = :Disk 1:fontTome
-
- # • split font compression
-
- # source file name
- SplitFontFileName = Monaco
- # interim file resulting from splitting operation
- SplitFontTempName = splitFontObjectFile
- # archive resulting from compression of first split portion
- SplitFontArchive1 = :Disk 1:splitFontTome1
- # archive resulting from compression of second split portion
- SplitFontArchive2 = :Disk 2:splitFontTome2
-
-
- # make the debug version of finished installer script
- "{debugScriptName}" ƒ "{scriptName}"
- # make a copy of the finished installer script and rename the copy
- Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
- # add the installer debugger resources to the copied installer script
- Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
-
- # make the standard version of finished installer script
- "{scriptName}" ƒƒ "{scriptName}.r" "{CompressFontArchiveName}" "{SplitFontArchive1}" "{SplitFontArchive2}" "{localScriptCheckExtName}"
- # establish current date with time of NOON
- set theTime "'`date -d -s` 12:00:00 PM'"
- # rez the installer source into the form that the installer can read
- Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}"
- # establish filename for finished installer script, set creation date and time, set attributes
- SetFile -a b -d {theTime} "{scriptName}"
- # run scriptcheck utility on the rezzed installer script
- "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
- # set modification date and time for finished installer script
- SetFile -m {theTime} "{scriptName}"
-
- # be sure that's there's a copy of the InstaCompOne ScriptCheck extension in current folder
- "{localScriptCheckExtName}" ƒ "{ScriptCheckExtension}"
- # copy and rename the original scriptcheck extension
- Duplicate -y "{ScriptCheckExtension}" "{localScriptCheckExtName}"
-
- # do the simple font compression
- "{CompressFontArchiveName}" ƒ "{CompressFontFileName}"
- # compress entire 'sfnt' resource into the font archive
- "{compressTool}" "{CompressFontFileName}" -k sfnt=9217 -a part=128 -o "{CompressFontArchiveName}"
- # compress entire 'NFNT' resource into the font archive
- "{compressTool}" "{CompressFontFileName}" -k NFNT=1025 -a part=129 -o "{CompressFontArchiveName}"
- # duplicates the FOND resource within "Chicago" and calls it 'iFND'
- "{fondTool}" "{CompressFontFileName}" -o "{CompressFontArchiveName}"
-
- # do the split font compression
- "{SplitFontArchive1}" "{SplitFontArchive2}" ƒ "{SplitFontFileName}"
- # split single 'sfnt' rsrc - largest piece=30K - put into 'sfnt' rsrc 200,201, etc. = place in interim file
- "{splitTool}" "{SplitFontFileName}" -k sfnt=17127 -a sfnt=200 -s 30000 -o "{SplitFontTempName}"
- # compress the first 'sfnt' part into first archive for split font
- "{compressTool}" "{SplitFontTempName}" -k sfnt=200 -a part=200 -o "{SplitFontArchive1}"
- # compress the second 'sfnt' part into second archive ( for split font )
- "{compressTool}" "{SplitFontTempName}" -k sfnt=201 -a part=201 -o "{SplitFontArchive2}"
- # compress one of the two 'NFNT' rsrc's into first archive ( for split font )
- "{compressTool}" "{SplitFontFileName}" -k NFNT=17774 -a part=300 -o "{SplitFontArchive1}"
- # compress the remaining 'NFNT' into first archive ( for split font )
- "{compressTool}" "{SplitFontFileName}" -k NFNT=19242 -a part=301 -o "{SplitFontArchive1}"
- # duplicates the FOND resource within "Monaco" and calls it 'iFND'
- "{fondTool}" "{SplitFontFileName}" -o "{SplitFontArchive1}"
-
-
-